This invention related to computer systems, more particularly to managing versions of metadata.
Versioned metadata allows for multiple versions of metadata for a given object to exist concurrently on a system. This is required to support the parallel execution of operations which would otherwise be mutually exclusive. For, example, a system cache can serve as a global repository of cached metadata for objects such as tables and indexes. When a request is received to access a resource, the database system converts the request through compilation into a program unit, or cursor. When a program unit accesses an object, a lock can be placed on the metadata for that object. This lock prevents any changes to the metadata so that the program unit can execute the desired operation without mid-execution changes from other program units that may cause the program unit to fail or may invalidate the result. This means that long running program units may lock the metadata for a long period of time, potentially blocking object changes that cause metadata updates even if those updates were known to have no affect on the executing program unit. This inherently limits scalability and performance as all activity on an object must be completed before that object, and consequently, before its metadata, can be modified. A solution is required which will allow programming units to execute while concurrently allowing object updates.
One embodiment of managing versions of metadata includes linking a dependent object for a resource to the most recent metadata version of the resource, maintaining any metadata version while in use, and deleting any metadata version when no longer in use.
In one system embodiment, the versioning infrastructure includes a search and create process, an aging-out process, and a dependency mechanism. In another embodiment the dependency mechanism is not included. The search and create process manages new and obsolete versions of metadata. The aging-out process maintains the obsolete metadata versions in the system while needed. The dependency mechanism allows a client or another object to declare interest in, or dependency on, a metadata object. In another embodiment, a viewing process allows the viewing of any and/or all active versions of a metadata. Further details are described below in the detailed description, drawings and claims.